package com.fs.controller;


import com.fs.entity.ResponseData;
import com.fs.service.IAdministratorsService;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-06-12
 */
@RestController
@RequestMapping("/administrators")
public class AdministratorsController {
    @Autowired
    private IAdministratorsService administratorsService;
    @PostMapping("login")

    public ResponseData Login(String acount,String apassword){
        return administratorsService.Login(acount,apassword);
    }


    @PutMapping("/update")
    public ResponseData Update(int aid, String newapassword, String newaphnumber, String newemail){
        return administratorsService.Update(newapassword,newaphnumber,newemail,aid);
    }
    @PostMapping("spot")
    public ResponseData spotcheck(){
        return administratorsService.Spotcheck();
    }

}
